@import '../variables/default.scss';
@import '../mixins/index.scss';

.at-date-picker-ali {
  .picker-item {
    line-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
  }

  /* 自定义时间 */
  .picker-container {
    display: flex;
    flex-direction: column;

    /* justify-content: center; */
    align-items: center;
    width: 100%;
    overflow: hidden;
    position: fixed;
    bottom: -640px;
    left: 0;

    /* height: 0; */
    transition: height 0.5s;
    z-index: 2000;
    background: white;
    border-top: 2px solid #efeff4;
  }

  .picker-placeholder {
    color: $color-grey-3;
  }

  .picker-value {
    color: $color-grey-0;
  }

  .picker-placeholder.picker-disabled {
    color: rgba($color: $color-grey-3, $alpha: 0.4);
  }

  .picker-value.picker-disabled {
    color: rgba($color: $color-grey-0, $alpha: 0.4);
  }
}

.at-picker-popup {
  left: 0;
  bottom: 0;
  position: fixed;
  width: 100%;
  background-color: $color-bg;
  padding-bottom: env(safe-area-inset-bottom);

  .picker-placeholder {
    color: $color-grey-3;
  }

  .picker-value {
    color: $color-grey-0;
  }

  .picker-placeholder.picker-disabled {
    color: rgba($color: $color-grey-3, $alpha: 0.4);
  }

  .picker-value.picker-disabled {
    color: rgba($color: $color-grey-0, $alpha: 0.4);
  }

  &-wrap {
    position: fixed;
    overflow: auto;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: $zindex-picker;
    -webkit-overflow-scrolling: touch;
    outline: 0;

    /* prettier-ignore */
    transform: translateZ(1PX);
  }

  &-mask {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background-color: $color-bg-mask;
    height: 100%;
    z-index: $zindex-picker;

    /* prettier-ignore */
    transform: translateZ(1PX);

    &-hidden {
      display: none;
    }
  }

  &-header {
    background-image: -webkit-linear-gradient(top, #e7e7e7, #e7e7e7, transparent, transparent);
    background-image: linear-gradient(to bottom, #e7e7e7, #e7e7e7, transparent, transparent);
    background-position: bottom;

    /* prettier-ignore */
    background-size: 100% 1PX;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    position: relative;
    @include hairline-bottom();

    & & {
      &-right {
        text-align: right;
      }

      &-left {
        color: #ccc;
      }
    }
  }

  &-item {
    color: $color-brand;
    font-size: $font-size-xl;
    padding: $spacing-v-md $spacing-h-lg;
    height: $option-height;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;

    &-active {
      background-color: $color-bg-tap;
    }
  }

  &-title {
    flex: 1;
    text-align: center;
    color: $color-text-base;
  }

  & &-close {
    display: none;
  }
}

.at-picker-col {
  flex: 1;
}

.at-date-picker {
  .picker-item {
    line-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
  }

  .picker-layout {
    .layout-body {
      padding: 0;
    }

    .picker-header {
      height: 90px;
      border-bottom: $border-width-md solid $color-grey-4;
      border-radius: 16px 16px 0 0;
      line-height: 90px;
      text-align: center;
      font-size: $font-size-base;
      margin-bottom: 15px * $hd;

      .ok-text {
        color: $color-brand;
      }

      .cancel-text {
        color: $color-grey-3;
      }

      .picker-header-title {
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-weight: bold;
      }
    }
  }

  /* 自定义时间 */
  .picker-container {
    display: flex;
    flex-direction: column;

    /* justify-content: center; */
    align-items: center;
    width: 100%;
    overflow: hidden;
    position: fixed;
    bottom: -640px;
    left: 0;

    /* height: 0; */
    transition: height 0.5s;
    z-index: 2000;
    background: white;
    border-top: 2px solid #efeff4;
  }

  .sensorType-screen {
    width: 100vw;

    /* height:400rpx; */
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: #000;
    opacity: 0;
    overflow: hidden;
    z-index: 1999;
    color: #fff;
  }

  .sensorTypePicker {
    width: 690px;
    height: 240px;

    /* padding: 45px 0; */
  }

  .box {
    padding: 0 20px;
  }

  /* 至 */
  .to {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgb(138, 138, 138);

    /* font-size:30rpx; */
  }

  /* 确定 */
  .sure {
    width: 100%;
    height: 90px;
    border-top: 2px solid #efeff4;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgb(36, 123, 255);
    font-size: 32px;
  }

  .btn-box {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eee;
  }

  .pick_btn {
    padding: 14px 30px;
    color: #ccc;

    /* background-color: #159; */
  }

  .show_picker {
    /* height: 320px; */
  }

  .hide_picker {
    /* height: 0; */
  }
}
